package com.darren.euc.dao.impl;


import org.hibernate.Query;
import org.hibernate.Session;
import org.springframework.stereotype.Repository;

import com.darren.euc.dao.ClientExtensionDao;
import com.darren.euc.entity.ClientExtension;


@Repository
public class ClientExtensionDaoImpl extends BaseDaoImpl<ClientExtension, Integer> implements ClientExtensionDao {
	
	public int deleteByClientId(Integer clientId){
		Session session = sessionFactory.getCurrentSession();	
		Query query  = session.createSQLQuery("delete from euc_client_extension where client_id = ?");
		query.setParameter(0, clientId);
		int rowCount = query.executeUpdate();
		return rowCount;
		
	}

}